package cn.xq.pethome.base.service.impl;

import cn.xq.pethome.base.mapper.BaseMapper;
import cn.xq.pethome.base.query.BaseQuery;
import cn.xq.pethome.base.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class BaseServiceImpl<T> implements BaseService<T> {
   @Autowired
   private BaseMapper<T> baseMapper;

    @Override
    public void insert(T t) {
        baseMapper.insert(t);
    }

    @Override
    public void delete(Long id) {
        baseMapper.delete(id);
    }

    @Override
    public void update(T t) {
        baseMapper.update(t);
    }

    @Override
    public T fingone(Long id) {
        return baseMapper.fingone(id);
    }

    @Override
    public List fingall() {
        return baseMapper.fingall();
    }

    @Override
    public List findquery(BaseQuery baseQuery) {
        return baseMapper.findquery(baseQuery);
    }

    @Override
    public Long fingquerycount(BaseQuery baseQuery) {
        return baseMapper.fingquerycount(baseQuery);
    }

    @Override
    public void batchDelete(List ids) {
        baseMapper.batchDelete(ids);
    }
}
